package items100;

import java.io.Console;

public class Item55 {

	public static void main(String[] args) {	
		System.out.println(add(5, 12));
		System.out.println(add(7, 4));
	}
	
	
	public static int add(int a, int b){
		int tmp1 = a ^ b;
		int tmp2 = (a & b)<<1;
		if(tmp2 == 0){
			return tmp1;
		}
		return add(tmp1, tmp2);
	}

}
